<script setup>
import { userLoginUserStore } from "@/store/user";
import AccessEnum from "@/access/accessEnum";
import { listAppointmentsByPageUsingPost } from "@/api/appointmentsController";
import message from "@arco-design/web-vue/es/message";
import { onMounted, ref } from "vue";
import { IconPlus, IconDelete } from "@arco-design/web-vue/es/icon";
import { listLeaveTabByPageUsingPost } from "@/api/leaveTabController";
import {
  addBuildingTypeUsingPost,
  deleteBuildingTypeUsingPost,
  listBuildingTypeByPageUsingPost,
} from "@/api/buildingTypeController";
import { getTime } from "../utitl/time";
const userLoginUser = userLoginUserStore();
const dataList = ref([]);
const dataList1 = ref([]);
const total = ref(0);
const total1 = ref(0);
const initSearchParams = {
  current: 1,
  pageSize: 10,
};
const projectType = ref({
  content: "",
});
const searchParams = ref({
  ...initSearchParams,
});

const loadData = async () => {
  const res = await listAppointmentsByPageUsingPost(searchParams.value);
  const resqust = await listLeaveTabByPageUsingPost(searchParams.value);
  const resqust2 = await listBuildingTypeByPageUsingPost(searchParams.value);
  if (res.data.code === 0 && resqust.data.code === 0) {
    dataList.value = res.data.data?.records || [];
    total.value = res.data.data?.total || 0;
    total1.value = resqust.data.data?.total || [];
    dataList1.value = resqust2.data.data?.records || [];
  } else {
    message.error("获取数据失败，" + res.data.message);
  }
};
const columns = [
  {
    title: "id",
    dataIndex: "id",
    ellipsis: true,
    tooltip: true,
    width: 100,
  },
  {
    title: "类型",
    dataIndex: "content",
  },
  {
    title: "操作",
    slotName: "optional",
  },
];
/**
 * 删除
 * @param record
 */
const doDelete = async (record) => {
  if (!record.id) {
    return;
  }
  const res = await deleteBuildingTypeUsingPost({
    id: record.id,
  });
  if (res.data.code === 0) {
    message.success("删除成功");
    loadData();
  } else {
    message.error("删除失败，" + res.data.message);
  }
};
const addBuildingTypeUsingPostData = async () => {
  const res = await addBuildingTypeUsingPost(projectType.value);
  if (res.data.code === 0) {
    message.success("添加成功");
    loadData();
  } else {
    message.error(res.data.message);
  }
};
onMounted(() => {
  if (userLoginUser.loginUser.userRole === AccessEnum.ADMIN) {
    loadData();
  }
});
const visible = ref(false);

const showAdd = () => {
  visible.value = true;
};
const handleOk = () => {
  visible.value = false;
  addBuildingTypeUsingPostData();
};
const handleCancel = () => {
  visible.value = false;
};
</script>

<template>
  <div
    class="homeOne"
    v-if="userLoginUser.loginUser.userRole != AccessEnum.ADMIN"
  >
    <div class="bg">
      <div class="content">
        <h1>xxxxxxxxxx建筑</h1>
        <div class="text">
          这个错误表示在尝试调用com.yupi.springbootinit.model.entity.Appointments类的getTitle()方法时出现了空指针异常，因为appointments对象为null。
          一、可能的原因
          appointments对象未正确初始化：在调用getTitle()方法的位置，appointments对象可能没有被正确地创建或赋值，导致其为null。
          数据获取问题：可能在从数据库或其他数据源获取appointments对象时出现了问题，导致没有成功获取到对象。
          二、解决方法 检查appointments的初始化逻辑：
          确认在调用getTitle()方法之前，appointments对象已经被正确地初始化。可以检查相关的代码逻辑，确保在需要使用appointments对象的地方，它已经被正确地创建或从合适的地方获取到了非null的值。
          检查数据获取过程： 如果appointments是从数据库中获取的，
        </div>
      </div>
    </div>
    <div class="car">
      <div class="head"><h2>优势特点</h2></div>
      <div class="box">
        <a-card class="card-demo" title="丰富经验与传承" hoverable>
          <template #extra>
            <svg
              t="1724140731267"
              class="icon"
              viewBox="0 0 1024 1024"
              version="1.1"
              xmlns="http://www.w3.org/2000/svg"
              p-id="14855"
              width="32"
              height="32"
            >
              <path
                d="M517.4 464.7H441c-73.7 0-133.6-59.9-133.6-133.6 0-73.7 59.9-133.6 133.6-133.6h76.4c73.7 0 133.6 59.9 133.6 133.6 0.1 73.6-59.9 133.6-133.6 133.6zM441 227.4c-57.1 0-103.6 46.5-103.6 103.6S383.9 434.7 441 434.7h76.4c57.1 0 103.6-46.5 103.6-103.6s-46.5-103.6-103.6-103.6H441z"
                fill="#2c2c2c"
                p-id="14856"
              ></path>
              <path
                d="M735.1 765.4H344.7c-64.6 0-117.4-52.8-117.4-117.4V404.6c0-64.6 52.8-117.4 117.4-117.4h390.4c64.6 0 117.4 52.8 117.4 117.4V648c0 64.5-52.9 117.4-117.4 117.4z"
                fill="#2c2c2c"
                p-id="14857"
              ></path>
              <path
                d="M615.2 765.4H344.7c-64.6 0-117.4-52.8-117.4-117.4V404.6c0-64.6 52.8-117.4 117.4-117.4h270.6c64.6 0 117.4 52.8 117.4 117.4V648c-0.1 64.5-52.9 117.4-117.5 117.4z"
                fill="#2c2c2c"
                p-id="14858"
              ></path>
              <path
                d="M640.5 469.5h-163c-8.3 0-15-6.7-15-15s6.7-15 15-15h163c8.3 0 15 6.7 15 15s-6.7 15-15 15zM433.5 469.5h-16c-8.3 0-15-6.7-15-15s6.7-15 15-15h16c8.3 0 15 6.7 15 15s-6.7 15-15 15zM376.5 469.5h-48c-8.3 0-15-6.7-15-15s6.7-15 15-15h48c8.3 0 15 6.7 15 15s-6.7 15-15 15zM269.6 415.6c-7.4 0-13.8-5.4-14.8-13-0.1-0.4-0.1-0.8-0.2-1.2-0.9-8.2 5-15.7 13.2-16.6 8.2-0.9 15.7 5 16.6 13.2 0 0.2 0 0.4 0.1 0.6 1.1 8.2-4.6 15.8-12.8 16.9-0.8 0-1.5 0.1-2.1 0.1zM286.7 372.8c-2.9 0-5.9-0.9-8.5-2.7-6.8-4.7-8.5-14.1-3.8-20.9 13.8-19.9 36.3-31.7 37.3-32.1 7.4-3.8 16.4-0.9 20.2 6.5 3.8 7.4 0.9 16.4-6.5 20.2-0.2 0.1-16.9 8.9-26.3 22.5-3 4.2-7.7 6.5-12.4 6.5z"
                fill="#2c2c2c"
                p-id="14859"
              ></path>
              <path
                d="M657.7 776H293c-78 0-141.5-59.4-141.5-132.4V523.1c0-8.3 6.7-15 15-15s15 6.7 15 15v120.4c0 56.5 50 102.4 111.5 102.4h364.7c40.9 0 78.6-20.7 98.2-54.1 4.2-7.1 13.4-9.5 20.5-5.3s9.5 13.4 5.3 20.5c-25 42.6-72.5 69-124 69zM783.4 671.8c-0.6 0-1.2 0-1.8-0.1-8.2-1-14.1-8.5-13.1-16.7 0.5-3.8 0.7-7.6 0.7-11.4 0-8.3 6.7-15 15-15s15 6.7 15 15c0 5-0.3 10.1-0.9 15-1 7.6-7.4 13.2-14.9 13.2zM784.2 613.3c-8.3 0-15-6.7-15-15V411.2c0-56.5-50-102.4-111.5-102.4H293c-61.5 0-111.5 45.9-111.5 102.4v46.1c0 8.3-6.7 15-15 15s-15-6.7-15-15v-46.1c0-73 63.5-132.4 141.5-132.4h364.7c78 0 141.5 59.4 141.5 132.4v187.1c0 8.3-6.7 15-15 15zM987.5 869.4h-20.4c-8.3 0-15-6.7-15-15s6.7-15 15-15h20.4c8.3 0 15 6.7 15 15s-6.7 15-15 15zM917.5 869.4H484.3c-8.3 0-15-6.7-15-15s6.7-15 15-15h433.2c8.3 0 15 6.7 15 15s-6.7 15-15 15z"
                fill="#2c2c2c"
                p-id="14860"
              ></path>
              <path
                d="M515.9 869.4H253.5c-8.3 0-15-6.7-15-15s6.7-15 15-15h262.4c8.3 0 15 6.7 15 15s-6.7 15-15 15zM154.5 869.4H36.8c-8.3 0-15-6.7-15-15s6.7-15 15-15h117.7c8.3 0 15 6.7 15 15s-6.7 15-15 15z"
                fill="#2c2c2c"
                p-id="14861"
              ></path>
              <path
                d="M54.3 299.1c-0.8 0-1.5-0.7-1.5-1.5v-38.7c0-0.8 0.7-1.5 1.5-1.5s1.5 0.7 1.5 1.5v38.7c0 0.8-0.7 1.5-1.5 1.5z"
                fill="#2c2c2c"
                p-id="14862"
              ></path>
              <path
                d="M42.2 293.7c-0.4 0-0.7-0.1-1-0.4-0.6-0.6-0.7-1.5-0.1-2.1l25.1-27.4c0.6-0.6 1.5-0.7 2.1-0.1 0.6 0.6 0.7 1.5 0.1 2.1l-25.1 27.4c-0.3 0.3-0.7 0.5-1.1 0.5z"
                fill="#2c2c2c"
                p-id="14863"
              ></path>
              <path
                d="M67.4 293.4c-0.4 0-0.8-0.2-1.1-0.5l-25.1-27.4c-0.6-0.6-0.5-1.6 0.1-2.1 0.6-0.6 1.6-0.5 2.1 0.1l25.1 27.4c0.6 0.6 0.5 1.6-0.1 2.1-0.3 0.3-0.6 0.4-1 0.4z"
                fill="#2c2c2c"
                p-id="14864"
              ></path>
              <path
                d="M72 279.7H36.5c-0.8 0-1.5-0.7-1.5-1.5s0.7-1.5 1.5-1.5H72c0.8 0 1.5 0.7 1.5 1.5s-0.6 1.5-1.5 1.5z"
                fill="#2c2c2c"
                p-id="14865"
              ></path>
              <path
                d="M120.5 460.9h-7.4c-1.4 0-2.5-1.1-2.5-2.5s1.1-2.5 2.5-2.5h7.4c1.4 0 2.5 1.1 2.5 2.5s-1.1 2.5-2.5 2.5zM96.7 460.9h-7.4c-1.4 0-2.5-1.1-2.5-2.5s1.1-2.5 2.5-2.5h7.4c1.4 0 2.5 1.1 2.5 2.5s-1.1 2.5-2.5 2.5zM99 454.7c-0.7 0-1.3-0.3-1.8-0.8l-5.3-5.7c-0.9-1-0.9-2.6 0.2-3.5 1-0.9 2.6-0.9 3.5 0.2l5.3 5.7c0.9 1 0.9 2.6-0.2 3.5-0.5 0.4-1.1 0.6-1.7 0.6zM117.1 473.1c-0.7 0-1.3-0.3-1.8-0.8l-5.3-5.7c-0.9-1-0.9-2.6 0.2-3.5 1-0.9 2.6-0.9 3.5 0.2l5.3 5.7c0.9 1 0.9 2.6-0.2 3.5-0.5 0.4-1.1 0.6-1.7 0.6zM111.8 454.2c-0.6 0-1.2-0.2-1.7-0.7-1-0.9-1.1-2.5-0.2-3.5l5.3-5.7c0.9-1 2.5-1.1 3.5-0.2 1 0.9 1.1 2.5 0.2 3.5l-5.3 5.7c-0.4 0.6-1.1 0.9-1.8 0.9zM105.2 454c-1.4 0-2.5-1.1-2.5-2.5v-8.1c0-1.4 1.1-2.5 2.5-2.5s2.5 1.1 2.5 2.5v8.1c0 1.4-1.1 2.5-2.5 2.5zM105.2 477.1c-1.4 0-2.5-1.1-2.5-2.5v-8.1c0-1.4 1.1-2.5 2.5-2.5s2.5 1.1 2.5 2.5v8.1c0 1.4-1.1 2.5-2.5 2.5zM94 473c-0.6 0-1.2-0.2-1.7-0.7-1-0.9-1.1-2.5-0.2-3.5l5.3-5.7c0.9-1 2.5-1.1 3.5-0.2 1 0.9 1.1 2.5 0.2 3.5l-5.3 5.7c-0.5 0.6-1.2 0.9-1.8 0.9z"
                fill="#2c2c2c"
                p-id="14866"
              ></path>
              <path
                d="M132.1 259.4H128c-3.1 0-5.7-2.5-5.7-5.7v-1c0-3.1 2.5-5.7 5.7-5.7h4.2c3.1 0 5.7 2.5 5.7 5.7v1c-0.1 3.1-2.7 5.7-5.8 5.7z"
                fill="#2c2c2c"
                p-id="14867"
              ></path>
              <path
                d="M90.6 581.4c-2.5 0-4.5-2-4.5-4.5v-0.8c0-2.5 2-4.5 4.5-4.5s4.5 2 4.5 4.5v0.8c-0.1 2.5-2.1 4.5-4.5 4.5z"
                fill="#2c2c2c"
                p-id="14868"
              ></path>
              <path
                d="M57.1 389.4c-7.3 0-13.2-6-13.2-13.2v-2.4c0-7.3 6-13.2 13.2-13.2 7.3 0 13.2 6 13.2 13.2v2.4c0 7.2-5.9 13.2-13.2 13.2z"
                fill="#2c2c2c"
                p-id="14869"
              ></path>
              <path
                d="M965.2 435.1H959c-5.4 0-9.8-4.4-9.8-9.8V424c0-5.4 4.4-9.8 9.8-9.8h6.2c5.4 0 9.8 4.4 9.8 9.8v1.3c0 5.4-4.4 9.8-9.8 9.8z m-6.2-15.9c-2.6 0-4.8 2.2-4.8 4.8v1.3c0 2.6 2.2 4.8 4.8 4.8h6.2c2.6 0 4.8-2.2 4.8-4.8V424c0-2.6-2.2-4.8-4.8-4.8H959z"
                fill="#2c2c2c"
                p-id="14870"
              ></path>
              <path
                d="M915.6 365.3c-0.8 0-1.5-0.7-1.5-1.5v-23.4c0-0.8 0.7-1.5 1.5-1.5s1.5 0.7 1.5 1.5v23.4c0 0.8-0.7 1.5-1.5 1.5z"
                fill="#2c2c2c"
                p-id="14871"
              ></path>
              <path
                d="M908.3 362c-0.4 0-0.7-0.1-1-0.4-0.6-0.6-0.7-1.5-0.1-2.1l15.2-16.6c0.6-0.6 1.5-0.7 2.1-0.1 0.6 0.6 0.7 1.5 0.1 2.1l-15.2 16.6c-0.3 0.4-0.7 0.5-1.1 0.5z"
                fill="#2c2c2c"
                p-id="14872"
              ></path>
              <path
                d="M923.5 361.9c-0.4 0-0.8-0.2-1.1-0.5l-15.2-16.6c-0.6-0.6-0.5-1.6 0.1-2.1 0.6-0.6 1.6-0.5 2.1 0.1l15.2 16.6c0.6 0.6 0.5 1.6-0.1 2.1-0.3 0.2-0.6 0.4-1 0.4z"
                fill="#2c2c2c"
                p-id="14873"
              ></path>
              <path
                d="M926.3 353.6h-21.5c-0.8 0-1.5-0.7-1.5-1.5s0.7-1.5 1.5-1.5h21.5c0.8 0 1.5 0.7 1.5 1.5s-0.7 1.5-1.5 1.5z"
                fill="#2c2c2c"
                p-id="14874"
              ></path>
              <path
                d="M967.8 521.5h-7.4c-1.4 0-2.5-1.1-2.5-2.5s1.1-2.5 2.5-2.5h7.4c1.4 0 2.5 1.1 2.5 2.5s-1.2 2.5-2.5 2.5zM944 521.5h-7.4c-1.4 0-2.5-1.1-2.5-2.5s1.1-2.5 2.5-2.5h7.4c1.4 0 2.5 1.1 2.5 2.5s-1.2 2.5-2.5 2.5zM946.2 515.4c-0.7 0-1.3-0.3-1.8-0.8l-5.3-5.7c-0.9-1-0.9-2.6 0.2-3.5 1-0.9 2.6-0.9 3.5 0.2l5.3 5.7c0.9 1 0.9 2.6-0.2 3.5-0.4 0.4-1.1 0.6-1.7 0.6zM964.3 533.8c-0.7 0-1.3-0.3-1.8-0.8l-5.3-5.7c-0.9-1-0.9-2.6 0.2-3.5 1-0.9 2.6-0.9 3.5 0.2l5.3 5.7c0.9 1 0.9 2.6-0.2 3.5-0.5 0.3-1.1 0.6-1.7 0.6zM959 514.8c-0.6 0-1.2-0.2-1.7-0.7-1-0.9-1.1-2.5-0.2-3.5l5.3-5.7c0.9-1 2.5-1.1 3.5-0.2 1 0.9 1.1 2.5 0.2 3.5l-5.3 5.7c-0.4 0.7-1.1 0.9-1.8 0.9zM952.4 514.6c-1.4 0-2.5-1.1-2.5-2.5V504c0-1.4 1.1-2.5 2.5-2.5s2.5 1.1 2.5 2.5v8.1c0 1.4-1.1 2.5-2.5 2.5zM952.4 537.7c-1.4 0-2.5-1.1-2.5-2.5v-8.1c0-1.4 1.1-2.5 2.5-2.5s2.5 1.1 2.5 2.5v8.1c0 1.4-1.1 2.5-2.5 2.5zM941.2 533.6c-0.6 0-1.2-0.2-1.7-0.7-1-0.9-1.1-2.5-0.2-3.5l5.3-5.7c0.9-1 2.5-1.1 3.5-0.2 1 0.9 1.1 2.5 0.2 3.5l-5.3 5.7c-0.5 0.7-1.1 0.9-1.8 0.9z"
                fill="#2c2c2c"
                p-id="14875"
              ></path>
              <path
                d="M904.2 603.4h-4.3c-1.2 0-2.1-1-2.1-2.1v-0.4c0-1.2 1-2.1 2.1-2.1h4.3c1.2 0 2.1 1 2.1 2.1v0.4c0 1.1-0.9 2.1-2.1 2.1z"
                fill="#2c2c2c"
                p-id="14876"
              ></path>
              <path
                d="M905.4 488.1h-9.3c-4 0-7.2-3.2-7.2-7.2v-0.8c0-4 3.2-7.2 7.2-7.2h9.3c4 0 7.2 3.2 7.2 7.2v0.8c0 3.9-3.2 7.2-7.2 7.2z m-9.3-10.2c-1.2 0-2.2 1-2.2 2.2v0.8c0 1.2 1 2.2 2.2 2.2h9.3c1.2 0 2.2-1 2.2-2.2v-0.8c0-1.2-1-2.2-2.2-2.2h-9.3z"
                fill="#2c2c2c"
                p-id="14877"
              ></path>
              <path
                d="M893.9 275.6a5.7 6.3 0 1 0 11.4 0 5.7 6.3 0 1 0-11.4 0Z"
                fill="#2c2c2c"
                p-id="14878"
              ></path>
            </svg>
          </template>
          xxxxxxx
        </a-card>
        <a-card class="card-demo" title="专业团队" hoverable>
          <template #extra>
            <svg
              t="1724140760505"
              class="icon"
              viewBox="0 0 1024 1024"
              version="1.1"
              xmlns="http://www.w3.org/2000/svg"
              p-id="16101"
              width="32"
              height="32"
            >
              <path
                d="M817.664 786.816v22.528c0 46.592-122.24 86.656-122.24 86.656l-50.944-6.528s-81.408-10.24-132.48-10.24c-50.944 0-132.48 10.24-132.48 10.24l-50.56 6.272s-122.624-39.936-122.624-86.4v-22.528c0-43.392 56.576-87.168 122.752-120.704 3.2-1.664 43.008 223.744 43.008 223.744l17.664-0.512s-34.048-232.704-30.592-234.24c18.304-8.448 30.336-16.256 48.384-22.784 6.656-2.432 38.656-19.84 20.736-66.56-41.472-42.24-69.632-83.2-69.632-175.488h307.456c0 91.392-28.928 132.608-70.144 174.976h0.256c-17.536 53.12 10.496 65.664 14.976 67.072 17.792 5.888 35.584 15.104 53.504 22.784 4.48 1.92-30.592 234.24-30.592 234.24l18.56-0.512s37.888-224.64 41.856-222.72c67.328 33.024 123.136 76.544 123.136 120.704M687.232 293.248c0-106.112-144.384-159.104-144.384-159.104-20.48-9.216-40.704-7.168-61.696 0 0 0-144.384 46.592-144.384 159.104 0 16.768-30.592 13.184-40.576 66.432h431.872c-18.56-53.632-40.832-49.664-40.832-66.432m0 0"
                fill="#2c2c2c"
                p-id="16102"
              ></path>
            </svg>
          </template>
          Card content <br />
          Card content
        </a-card>
        <a-card class="card-demo" title="先进的设备" hoverable>
          <template #extra>
            <svg
              t="1724140818777"
              class="icon"
              viewBox="0 0 1025 1024"
              version="1.1"
              xmlns="http://www.w3.org/2000/svg"
              p-id="17237"
              width="32"
              height="32"
            >
              <path
                d="M512.016875 999.03122"
                fill="#2c2c2c"
                p-id="17238"
              ></path>
              <path
                d="M512.016875 0C229.23403 0 0 229.23403 0 512.016875c0 282.749095 229.23403 511.983125 512.016875 511.983125 282.764095 0 512.006875-229.22403 512.006875-511.983125C1024.03 229.23403 794.79097 0 512.016875 0zM774.580946 708.394615c-1.680002 4.882506-4.785006 13.926267-13.980017 13.931267-5.586257 0-9.912512-3.763755-13.393766-7.460009-17.753772-18.741273-36.601295-37.187545-54.828817-55.021317l-0.922501-0.908751c-8.02251-7.84126-16.29377-9.951262-25.478781-6.455008-8.725011 3.310004-13.535017 9.400011-14.712518 18.633773-1.060001 8.04626 1.865002 14.965018 9.462512 22.455027 14.203767 13.988767 28.335035 28.051284 42.725052 42.372552l27.295033 27.150033-11.245014 5.883757c-14.551268 7.607509-30.136287 11.460014-46.318807 11.460014-53.066315 0-98.07637-40.293799-104.692628-93.731364-1.997502-16.11252-0.863751-29.941287 3.466254-42.270052 0.3175-0.903751 0.35625-1.352502 0.36125-1.465002-0.04875 0-0.37625-0.522501-1.488752-1.641252-69.516335-69.252585-131.13766-130.84391-188.40773-188.31023-1.456252-1.465002-1.851252-1.465002-2.007502-1.465002-0.4 0-1.181251 0.0875-2.636253 0.498751-9.336261 2.616253-18.960023 3.960005-28.603785 3.960005l-0.005 0c-50.220061 0-93.828865-35.542543-103.716377-84.512603-4.833756-23.978779-2.338753-46.015056 7.436259-65.50258l2.130003-4.252505 4.701256-0.762501c8.813761-1.411252 13.037516 4.331255 14.805018 6.592508 0.18625 0.23875 0.35625 0.482501 0.551251 0.682501 8.14001 8.05751 16.27002 16.19627 24.40503 24.34128 10.278763 10.292513 20.556275 20.581275 30.942538 30.771288 11.723764 11.508764 25.122531 12.705016 35.292543 2.715003 4.731256-4.648756 7.080009-10.297513 6.802508-16.31877-0.29875-6.463758-3.516254-12.987516-9.297511-18.856273-13.978767-14.218767-28.125034-28.291285-42.710052-42.822552l-29.272536-29.200036 12.935016-5.302506c16.45502-6.737508 31.811289-10.018762 46.957557-10.018762 16.41127 0 32.50504 4.047505 47.822558 12.031265 44.297554 23.100028 66.518831 74.540091 52.822564 122.328899-0.825001 2.871254-0.840001 2.925004 1.655002 5.405007 51.592563 51.411313 119.438896 119.096395 186.723978 186.747728 1.841252 1.850002 2.500003 1.850002 3.203754 1.850002 0.878751 0 2.113753-0.19375 3.793755-0.596251 9.810012-2.333753 19.487524-3.516254 28.735035-3.516254 29.912537 0 55.840068 11.945015 77.070094 35.493793C780.269702 633.594523 787.739712 669.927068 774.580946 708.394615z"
                fill="#2c2c2c"
                p-id="17239"
              ></path>
            </svg>
          </template>
          Card content <br />
          Card content
        </a-card>
        <a-card class="card-demo" title="出色的管理能力" hoverable>
          <template #extra>
            <svg
              t="1724140894729"
              class="icon"
              viewBox="0 0 1024 1024"
              version="1.1"
              xmlns="http://www.w3.org/2000/svg"
              p-id="21220"
              width="32"
              height="32"
            >
              <path
                d="M945.7 666c-8.2-9.3-37.7-14-71.7-14.4 0.8-43.9 10.2-131.6-7.3-146.8-10-8.7-167-20.6-318.2-12.2l4.4-64.5c46-0.8 85.8-5.1 95.1-14.4 23-23 26.9-172.9 0-203.6-26.9-30.7-230.5-23-261.3 15.4-30.7 38.4-26.9 172.9 0 188.2 10.6 6.1 50 10.9 95.2 13.2l3.6 69.4c-163.7 10.4-322.1 25.3-328.3 36-9.2 16-0.8 84.8 4.4 121.2-37.2 3.6-71.1 11.8-81.1 24.3C57 707.1 60 810 80.5 821.7c20.5 11.8 182.1 17.6 199.7 0 17.6-17.6 20.6-132.2 0-155.7-8.5-9.7-40.2-14.4-76.1-14.5-3.3-26.2-7.8-76.5 3.8-88.3 7.6-7.7 141-17.1 279.8-22.4l5.9 113.5c-34.3 3.9-64.4 11.8-73.8 23.5-23.5 29.4-20.6 132.2 0 143.9 20.6 11.8 182.1 17.6 199.7 0 17.6-17.6 20.6-132.2 0-155.7-9-10.3-43.8-14.9-82-14.5l7.7-112.7c131.6-3.9 268.6-4.1 275.1 6 10.1 15.6 15.1 72.4 11.6 109.7-36.9 3.6-76.2 10.9-86.2 23.3-23.5 29.4-20.6 132.2 0 143.9 20.6 11.8 182.1 17.6 199.7 0 17.9-17.6 20.8-132.2 0.3-155.7z"
                fill="#2c2c2c"
                p-id="21221"
              ></path>
            </svg>
          </template>
          Card content <br />
          Card content
        </a-card>
        <a-card class="card-demo" title="多客户认可" hoverable>
          <template #extra>
            <svg
              t="1724140928827"
              class="icon"
              viewBox="0 0 1024 1024"
              version="1.1"
              xmlns="http://www.w3.org/2000/svg"
              p-id="22336"
              width="32"
              height="32"
            >
              <path
                d="M944.034249 633.500215c23.016203-39.981596-15.074324-75.582419-29.762861-98.216929 3.074012-27.688619 34.031071-43.973514 20.833491-91.273796-24.300452-87.098707-227.402173-50.854225-318.466192-48.612161l0-0.992607c42.678008-61.059658 92.612281-149.592017 65.479317-251.994268-10.169617-38.381146-19.005866-77.04984-68.455091-76.391854-3.306302 1.322112-6.614651 2.645247-9.91993 3.968381-7.580652 63.981197-50.29857 116.00813-81.353866 158.736281-7.605212 15.211447-15.21247 30.42494-22.816658 45.63741-18.036795 32.172747-53.831023 59.299571-83.338057 80.360236-27.454282 19.596314-122.467239 69.312622-134.925992 93.256964-9.200546 17.681708-1.779529 43.290969 1.983167 62.503543 4.629437 48.937572 9.260921 97.892541 13.890358 146.831136 0.661056 45.961798 1.323135 91.938945 1.983167 137.90279-0.010233 22.034852-4.062526 49.449225 4.960988 62.501496 12.995989 18.801205 100.229772 27.049053 127.981836 35.716456 39.570227 12.356422 61.096497 40.71326 99.209536 52.581566 54.331419 16.916275 185.019901 13.693884 246.041696 3.968381 36.479843-5.815449 69.795623-3.419889 95.242178-18.8493 17.575284-10.657734 39.792285-40.074717 29.763884-73.417103-3.695159-12.282744-19.490913-20.306488-14.881942-39.682791 5.461385-22.969131 38.352493-27.678386 47.620577-49.606815 22.384823-52.955072-31.126928-70.903863-25.794479-96.233762C913.187707 653.779074 935.598112 648.156006 944.034249 633.500215zM250.552941 521.392928c-5.600555-30.841426-5.201465-71.355141-24.801872-88.296999-17.502629-15.127536-96.234785-25.429159-126.990253-26.786063-6.894014 8.53949-16.518209 14.504342-20.833491 25.794479-10.253528 26.818809-2.957355 74.497715 1.983167 104.169501 13.56597 81.459267 18.691711 165.495218 33.732266 244.058528 5.042853 26.336832 5.652743 88.493473 21.826098 101.19475 21.132296 16.597003 93.248777 14.668071 122.029264 5.952572 15.220656-22.539342 9.341762-81.697697 8.92937-117.067252C265.431813 685.157735 264.238638 596.759429 250.552941 521.392928z"
                p-id="22337"
                fill="#2c2c2c"
              ></path>
            </svg>
          </template>
          Card content <br />
          Card content
        </a-card>
      </div>
    </div>
  </div>
  <div
    class="homeTwo"
    v-if="userLoginUser.loginUser.userRole === AccessEnum.ADMIN"
  >
    <div class="header">
      <a-avatar
        :size="80"
        class="box1"
        style="margin-left: 50px"
        :image-url="userLoginUser.loginUser.userAvatar"
      >
      </a-avatar>
      <div class="h-left">
        <h1 style="color: black">
          {{ userLoginUser.loginUser.userName + "," + getTime() }}
        </h1>
        <a-breadcrumb>
          <a-breadcrumb-item
            >{{ userLoginUser.loginUser.userRole }}
          </a-breadcrumb-item>
          <a-breadcrumb-item>管理员管理一切</a-breadcrumb-item>
        </a-breadcrumb>
      </div>
      <div class="h-reight">
        <a-breadcrumb>
          <a-breadcrumb-item>预约数量： {{ total }} </a-breadcrumb-item>
          <a-breadcrumb-item>请假数量： {{ total1 }}</a-breadcrumb-item>
        </a-breadcrumb>
      </div>
    </div>
    <div class="c-count">
      <div class="a-count">
        <div class="cc-count">
          <h4 style="color: black; margin-left: 20px">待查看的预约</h4>
          <a-link href="/apppint" style="margin-right: 20px">全部项目</a-link>
        </div>
        <div class="cc-c">
          <a-card
            style="margin-left: 5%; margin-top: 5px"
            :size="20"
            class="card-demo"
            hoverable
            v-for="i in dataList"
            :key="i"
            :title="i.title"
          >
            <template #extra>
              <a-link>待查看</a-link>
            </template>
            {{ i.content }}
          </a-card>
        </div>
      </div>
      <div class="b-count">
        <div class="cc-count">
          <h4 style="color: black; margin-left: 20px">项目类型</h4>
        </div>
        <div class="bb-b">
          <a-table :columns="columns" :data="dataList1">
            <template #optional="{ record }">
              <a-space>
                <a-button type="outline" @click="showAdd">
                  <icon-plus />
                </a-button>
                <a-button status="danger" @click="doDelete(record)"
                  ><icon-delete
                /></a-button>
              </a-space>
            </template>
          </a-table>
        </div>
      </div>
    </div>
  </div>
  <a-modal v-model:visible="visible" @ok="handleOk" @cancel="handleCancel">
    <template #title> 添加项目类型 </template>
    <div>
      <a-input
        :style="{ width: '320px' }"
        placeholder="请输入项目类型"
        allow-clear
        v-model="projectType.content"
      />
    </div>
  </a-modal>
</template>

<style scoped>
.homeOne {
  width: 100%;
  margin-top: -30px;
}
.bg {
  width: 100%;
  height: 400px;
  padding-top: 40px;
  background-image: url("https://p1-arco.byteimg.com/tos-cn-i-uwbnlip3yd/cd7a1aaea8e1c5e3d26fe2591e561798.png~tplv-uwbnlip3yd-webp.webp");
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
}
.content {
  float: right;
  width: 30%;
  height: 300px;
  margin-right: 100px;
  border-radius: 10%;
}
.car {
  width: 100%;
}
.head {
  width: 100px;
  margin: 0 auto;
}
.box {
  display: flex;
  align-content: center;
  justify-content: space-between;
  width: 100%;
}
.card-demo {
  width: 360px;
  margin-left: 24px;
  transition-property: all;
}
.card-demo:hover {
  transform: translateY(-4px);
}
.homeTwo {
  width: 100%;
  height: 100%;
  background: #f1f1f1;
}
.header {
  display: flex;
  width: 100%;
  height: 150px;
  background: white;
}
.h-left {
  width: 500px;
  margin-top: 50px;
  margin-left: -70px;
}
.h-reight {
  margin-top: 80px;
  margin-left: 350px;
}
.box1 {
  margin-top: 40px;
  margin-right: 20px;
  margin-left: 20px;
}
h1 {
  font-size: 18px;
}
.c-count {
  display: flex;
  width: 100%;
  height: 70%;
  margin-top: 20px;
}
.cc-count {
  display: flex;
  justify-content: space-between;
  width: 100%;
  background: white;
}
.cc-c {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  margin-top: 10px;
}
.a-count {
  width: 70%;
}
.b-count {
  width: 29%;
  height: 500px;
  margin-left: 1%;
}
.bb-b {
  width: 100%;
  height: 500px;
  margin-top: 10px;
  background: white;
}
</style>
